package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 围栏报警对象 enclosure_alert
 * 
 * @author ruoyi
 * @date 2025-09-17
 */
@Data
public class EnclosureAlert extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Integer id;

    /** 报警名称 */
    @Excel(name = "报警名称")
    private String triggerName;

    /** 报警规则id */
    @Excel(name = "报警规则id")
    private Integer triggerId;

    /** 报警类型  缺员报警-3  串岗报警-5  离岗报警-6 静止报警-8  聚集报警-10 */
    @Excel(name = "报警类型  缺员报警-3  串岗报警-5  离岗报警-6 静止报警-8  聚集报警-10")
    private Integer type;

    /** 用户名 */
    @Excel(name = "用户名")
    private String userName;

    /** 实体id(员工id) */
    @Excel(name = "实体id(员工id)")
    private Integer entityId;

    /** 围栏id */
    @Excel(name = "围栏id")
    private Integer enclosureId;

    /** 报警名称 */
    @Excel(name = "报警名称")
    private String enclosureName;

    /** 地图id */
    @Excel(name = "地图id")
    private Integer areaId;

    /** 标签ID */
    @Excel(name = "标签ID")
    private String tagId;

    /** 触发时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "触发时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date raiseTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date stopTime;

    /** 报警状态  0:报警中; 1:报警结束;  */
    @Excel(name = "报警状态  0:报警中; 1:报警结束; ")
    private Integer state;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 逻辑删除标识 0删除 1正常 */
    private Integer delFlag;

    /** 市局上报唯一ID */
    @Excel(name = "市局上报唯一ID")
    private String governId;

    /** 上报状态 0待上报 1已上报 */
    @Excel(name = "上报状态 0待上报 1已上报")
    private Integer isUpload;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("triggerName", getTriggerName())
            .append("triggerId", getTriggerId())
            .append("type", getType())
            .append("userName", getUserName())
            .append("entityId", getEntityId())
            .append("enclosureId", getEnclosureId())
            .append("enclosureName", getEnclosureName())
            .append("areaId", getAreaId())
            .append("tagId", getTagId())
            .append("raiseTime", getRaiseTime())
            .append("stopTime", getStopTime())
            .append("state", getState())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .append("governId", getGovernId())
            .append("isUpload", getIsUpload())
            .toString();
    }
}
